﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Dack_Web2
{
    public static class CurrentContext
    {
        public static bool IsLogged
        {
            get
            {
                return HttpContext.Current.Request.Cookies["TenDangNhap"] != null;
            }
        }
        public static string UserName
        {
            get
            {
                return HttpContext.Current.Request.Cookies["TenDangNhap"].Value;
            }
        }
        public static User User
        {
            get { return HttpContext.Current.Session["TenDangNhap"] as User; }
            set { HttpContext.Current.Session["TenDangNhap"] = value; }
        }
        /// <summary>
        /// Lấy nhanh giỏ hàng của User
        /// </summary>
       
    }
}